package com.dunshan.prcexp.request;

import com.dunshan.prcexp.config.Config;
import com.dunshan.prcexp.config.Init.Save;
import com.dunshan.prcexp.request.internal.Http;
import com.dunshan.prcexp.request.internal.Https;
import com.dunshan.prcexp.request.internal.impl.HttpImpl;
import com.dunshan.prcexp.request.internal.impl.HttpsImpl;

/**
 * @author liwen406
 * @program: dunshan-pef
 * @description:
 * @date 2022-08-24 20:27:38
 */
public class Request {
    private Config config;
    private String description;

    private Request(Config config, String description) {
        this.config = config;
        this.description = description;
    }

    public static Request create(Config config, String description) {
        return new Request(config, description);
    }

    public static Request create(String description) {
        return new Request(new Config(), description);
    }

    public Http http() {
        return new HttpImpl(this.config, Save.SINGLE, this.description);
    }

    public Https https() {
        return new HttpsImpl(this.config, Save.SINGLE, this.description);
    }
}
